VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsModuleSymbol"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Option Base 1

Public Function IsSymbol(ByVal Char As String) As Boolean
    IsSymbol = (InStr(1, "^&*()-_+=\:;<>.,", Char) > 0)
End Function

Public Sub ProcessSymbol(Token As clsToken, Provider As clsCodeProvider)
    Dim sChar As String
    sChar = Provider.GetCurrentChar
    Token.PushChar sChar
    Select Case sChar
        Case "^"
            Token.TokenType = Power
        Case "&"
            Token.TokenType = ForceConcat
        Case "*"
            Token.TokenType = Multiply
        Case "("
            Token.TokenType = OpenPa
        Case ")"
            Token.TokenType = ClosePa
        Case "-"
            Token.TokenType = Minus
        Case "_"
            Token.TokenType = Underline
        Case "+"
            Token.TokenType = Plus
        Case "="
            Token.TokenType = Equals
        Case "\"
            Token.TokenType = ModSign
        Case ":"
            Token.TokenType = Colon
        Case ";"
            Token.TokenType = SemiColon
        Case "<"
            pmJudgeLessThan Token, Provider
        Case ">"
            pmJudgeGreaterThan Token, Provider
        Case "."
            Token.TokenType = Dot
        Case ","
            Token.TokenType = Comma
    End Select
End Sub

Private Sub pmJudgeLessThan(pToken As clsToken, pProvider As clsCodeProvider)
    If pProvider.MatchNextChar("=", , True) Then
        pToken.TokenType = LessEqualThan
    Else
        pToken.TokenType = LessThan
    End If
End Sub

Private Sub pmJudgeGreaterThan(pToken As clsToken, pProvider As clsCodeProvider)
    If pProvider.MatchNextChar("=", , True) Then
        pToken.TokenType = GreaterEqualThan
    Else
        pToken.TokenType = GreaterThan
    End If
End Sub
